var db = require( '../db/db' );

const USRE_GUIDE = 'core.user_guide';


let getUserById = async function(id){
    if(!id) return;  
    var sql = `SELECT * FROM ${ USRE_GUIDE } WHERE id = $1`;

    try {

        let result = await db.runSql(sql, [id]); 

        if ( result ) {
            return result;
        }
        return null;

    } catch ( e ) {
        console.error( `查询用户引导出错` );
        return null;
    }
}
module.exports = {
    getUserById
}